package kiwi.assist.dev.guieditor.command {
	import kiwi.assist.dev.guieditor.event.GUIOperateEvent;
	import kiwi.assist.dev.guieditor.model.UiDetailVO;
	import kiwi.assist.dev.util.SkinComponentAdapter;

	import org.robotlegs.mvcs.Command;

	/**
	 * 添加一个背景到背景层
	 * @author zhangming.luo
	 */
	public class AddBackgroundCommand extends Command {
		[Inject]
		public var event : GUIOperateEvent;
		[Inject]
		public var detail : UiDetailVO;
		private var background : SkinComponentAdapter;

		override public function execute() : void {
			super.execute();
			background = SkinComponentAdapter(event.targetUi);
			detail.backgroundSkinList.push(background);
		}
	}
}
